package com.wxl52d41.Service.Impl;

import com.wxl52d41.Service.CommonLogTestService;
import com.wxl52d41.exception.BusinessException;
import com.wxl52d41.result.ResultEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;


/**
 * @author xlwang55
 * @date 2022/11/8 16:32
 */
@Service
@Slf4j
public class CommonLogTestServiceImpl implements CommonLogTestService {

    @Override
    public void test(String name) {

        if (StringUtils.isEmpty(name)) {
            throw new BusinessException(ResultEnum.VALIDATE_FAILED.getCode(), "名称为空");
        }
        log.info("名字为" + name);
    }
}
